import 'package:flutter/foundation.dart';
import 'package:test_app/core/base/base/base_logic.dart';
import 'package:test_app/routers/main/main_navigator.dart';
import 'package:test_app/core/utils/storage/storage_util.dart';
import 'order_state.dart';

class OrderController extends BaseLogic {

  final OrderState orderState = OrderState();

  @override
  void initData() {
    super.initData();
    init();
    debugPrint('OrderController init -> args: $args, id: $id');
  }

  init() {
    orderState.title = '12';
  }

  readUserInfo() {
    orderState.userInfo.value = StorageUtil.getObject("userInfo");
  }

  back() {
    MainNavigator.back('1111');
  }

  toHome() {
    MainNavigator.toHome();
  }

}
